window.resultStr;
function change() {
    var textBoxLeftValue = document.getElementsByClassName("left")[0].value;
	window.resultStr=textBoxLeftValue.replace(/\ +/g," ");//去掉空格
    // resultStr=testStr.replace(/[ ]/g,"");    //去掉空格
    window.resultStr=window.resultStr.replace(/[\r\n]/g," ");//去掉回车换行
    var btn = document.getElementById("submit");
    document.getElementsByClassName('right')[0].value = window.resultStr;
 }
